package com.ptszyxx.popose.common.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.ptszyxx.popose.R;
import com.ptszyxx.popose.databinding.ItemCommonPicBinding;
import com.ysg.utils.YImageUtil;

public class CommonPicAdapter extends BaseQuickAdapter<String, BaseDataBindingHolder<ItemCommonPicBinding>> {

    private Presenter mPresenter = new Presenter();

    public CommonPicAdapter() {
        super(R.layout.item_common_pic);
    }

    @Override
    protected void convert(@NonNull BaseDataBindingHolder<ItemCommonPicBinding> holder, String item) {
        ItemCommonPicBinding binding = holder.getDataBinding();
        if (binding != null) {
            binding.executePendingBindings();
            YImageUtil.show(binding.circleImage, item);
        }
    }

    public static class Presenter{
//        public void onItemClick(HomeVM viewModel, HomeResult entity){
//            viewModel.jumpPersonDetail(entity);
//        }
//        public void onHeartClick(HomeVM viewModel, HomeResult entity, int position){
//            viewModel.heart(entity, position);
//        }
//        public void onChatClick(HomeVM viewModel, HomeResult entity){
//            viewModel.jumpChat(entity);
//        }
    }








}
